package com.example.back.controller.records;

import com.example.back.bean.records.PlayerRoomMode;
import com.example.back.dao.records.PlayerRoomModeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/playingTable")
public class PlayerRoomModeController {

    @Autowired
    private PlayerRoomModeDao playerRoomModeDao;

    @RequestMapping("/onlineTable")
    public List<PlayerRoomMode> getOnlineTable(){
        return playerRoomModeDao.getOnlineTable();
    }

    @RequestMapping("/csMjTable")
    public List<PlayerRoomMode> getCsMjTable(){
        return playerRoomModeDao.getCsMjOnlineTable();
    }

    @RequestMapping("/pdkTable")
    public List<PlayerRoomMode> getPdkTable(){
        return playerRoomModeDao.getPdkOnlineTable();
    }
}
